// @ts-ignore

/* eslint-disable */
import { request, useRequest } from 'umi';



/** 批量创建do POST /doa/createWithFile */

export async function patchDoWithFile(options) {
  return request('/doa/createWithFile', {
    method: 'POST',
    data: body,
    ...(options || {}),
  });
}

/** 创建单个do POST /doa/createWithPost */

export async function createWithPost(body, options) {
  return request('/doa/createWithPost', {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}


/** 搜索关键词 GET /doa/search */

export async function search(params, options) {
  // const res =  request('http://localhost:8080/doa/search', {
  const res = request('/doa/search', {
    method: 'GET',
    headers: {
      'Content-Type': 'application/json',
    },
    params: {...params},
    ...(options || {}),
  });
  return res
}



  /** 获取json文件 GET /doa/getJsonInfo */

  export async function getJsonInfo(params, options) {
    // const res =  request('http://localhost:8080/doa/search', {
    const res =  request('/doa/getJsonInfo', {
      method: 'GET',
      headers: {
        'Content-Type': 'application/json',
      },
      params: { ...params},
      ...(options || {}),
    });
    return res
}
